import request from '@/utils/request'

// 查询库区列表
export function listErpMaterial(query, pageReq) {
    return request({
        url: '/wms/material/listAll',
        method: 'post',
        data: query,
        params: pageReq
    })
}

// 查询库区详细
export function getErpArea(id) {
    return request({
        url: '/wms/material/' + id,
        method: 'get'
    })
}

// 新增库区
export function addErpMaterial(data) {
    return request({
        url: '/wms/material',
        method: 'post',
        data: data
    })
}

// 修改库区
export function updateErpArea(data) {
    return request({
        url: '/wms/material',
        method: 'put',
        data: data
    })
}

// 删除库区
export function delErpMaterial(id) {
    return request({
        url: '/wms/material/' + id,
        method: 'delete'
    })
}

// 导出库区
export function exportErpArea(query) {
    return request({
        url: '/wms/material/export',
        method: 'get',
        params: query
    })
}